package terms;

import java.util.Collection;

/**
 * Term : the class which represents a term.
 * Mar 30, 2012
 * Ecole des Mines de Nantes
 * Major in Information and Communications Systems Engineering.
 * @author Pierre Reliquet, Simon Devineau
 */
public abstract class AbstractTerm {
    /**
     * equals().
     * @param anObject
     *            an object
     * @return true if the object o has is the same object that the local
     *         object.
     */
    @Override
    public abstract boolean equals(Object anObject);

    /**
     * @return the length of the object
     * @return
     */
    public abstract int getLength();

    /**
     * @return the String representation of the variable or the function called.
     */
    public abstract String getName();

    /**
     * @return the rest of the term
     */
    public abstract Collection<AbstractTerm> getRest();

    @Override
    public abstract int hashCode();

    /**
     * @return true if there is a rest
     */
    public abstract boolean isRest();

    /**
     * toString().
     * @return a description of the object
     */
    @Override
    public abstract String toString();
}
